[r38]: / branches / SBSI / CODESYS_Control_Win_V3 / Plc Logic / Application / Function Blocks / Puzzle / ExamplePuzzleStateMachine / SendCommand / svnobj  Maximize  Restore  History

Download this file

16 lines (14 with data), 1.8 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
METHOD SendCommand : BOOL
VAR_INPUT
	Client : PuzzleClient;
	Command : CommandType;
	Value : STRING;	
END_VAR
IF NOT Client.bReadyFromPLC THEN
	Client.sCommandFromPLC:= Value;
	Client.iCommandFromPLC:= Command;
	Client.bReadyFromPLC:= TRUE;
	
	SendCommand := TRUE;
ELSE	
	SendCommand := FALSE;
END_IF